<template>
  <div>
    <Block title="涨停后持股收益率" :isFull="true">
      <div ref="chart" class="line-chart"></div>
    </Block>
  </div>
</template>

<script>
import Block from '@/components/common/Block.vue';
import drawEarnRateLine from '@/draw/EarnRateLine.js';

export default {
  components: {
    Block,
  },
  props: {
    riseData: {
      type: Array,
      default: () => [],
    },
  },
  methods: {
    initChart() {
      drawEarnRateLine && drawEarnRateLine(this.$refs.chart, this.riseData);
    },
  },
  mounted() {
    this.initChart();
  },
};
</script>

<style lang="less" scoped>
.block {
  border-radius: 0;
}
.line-chart {
  margin-top: 32px;
  width: 686px;
  height: 354px;
}
</style>
